import React from 'react';
import { connect } from 'react-redux';
import { changePage } from '../../store/actions';
import FormEditUser from '../../components/formEditUser';

class UserEdit extends React.Component{
  constructor(props){
    super(props);
  }
  changePage(){
    this.props.dispatch(changePage('user-edit'));
  }
  render(){
    return (
      <FormEditUser id={this.props.params.id} dispatch={this.props.dispatch} />
    )
  }
}
export default UserEdit = connect((state)=>{
  const {user} = state.rootReducer;
  return {user}
})(UserEdit)